package com.smtech.xz.app;

import android.app.Activity;
import android.app.Application;
import android.content.Context;

import com.mob.MobSDK;

import java.util.ArrayList;

public class App extends Application {

    public static Context appContext;
    public static ArrayList<Activity> allActivities = new ArrayList<Activity>();
    public static App app;

    @Override
    public void onCreate() {
        super.onCreate();
//        Resources res = super.getResources();
//        Configuration config = new Configuration();
//        config.setToDefaults();
//        res.updateConfiguration(config, res.getDisplayMetrics());

        appContext = getApplicationContext();
        app = this;

        MobSDK.init(this);
    }


    public static Context getConText(){
        return appContext;
    }

    public static App getApp(){
        return app;
    }

    public static void addActivity(Activity activity) {
        allActivities.add(activity);
    }

    public static void delActivity(Activity activity) {
        allActivities.remove(activity);
    }


}
